package com.mazj.beans;

import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

public class UserMain {
    public static void main(String[] args) {
        ApplicationContext ctx = new ClassPathXmlApplicationContext("applicationContext.xml");
        User user1 = (User) ctx.getBean("user1");
        System.out.println("user1:" + user1);

        User user2 = (User) ctx.getBean("user2");
        System.out.println("user2:" + user2);
    }
}
